//
//  singer.m
//  OC1_类和对象课后作业
//
//  Created by dllo on 15/10/22.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "singer.h"

@implementation singer

-(id)init
{

    _name = @"周杰伦";
    _sex = @"male";
    _age = 28;
    [self info];
    return self;

}

-(void)info
{

    NSLog(@"%@ %@ %ld", _name, _sex, _age);

}

-(void)singing
{

    NSLog(@"%@在%ld岁时唱了一首新歌", _name, _age);

}


-(NSString *)name;
{
    return _name;
}

-(void)setName:(NSString *)name;
{
    _name = name;
}
-(NSString *)sex;
{
    return _sex;
}
-(void)setSex:(NSString *)sex;
{
    _sex = sex;
}
-(NSInteger)age;
{
    return _age;
}
-(void)setAge:(NSInteger)age;
{
    _age = age;
}
-(id)initWithName:(NSString *)name sex:(NSString *)sex age:(NSInteger)age;
{

    _name = name;
    _sex = sex;
    _age = age;
    return self;

}


+ (id)singerWithName:(NSString *)name sex:(NSString *)sex age:(NSInteger)age
{
    singer *s = [[singer alloc] initWithName:name sex:sex age:age];
    return s;
}







@end
